<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Models\City;
use Illuminate\Support\Facades\DB;

class CityController extends Controller
{
    public function __construct()
    {
        $this->middleware('auth', [
            'except' => ['citylist']
        ]);
    }

    public function citylist(Request $request){
        $id = $request['id'];
        $data = DB::table('city')
            ->where('keys',$id)
            ->get();
//        dd($data);
        return ($data);
    }
}
